#include "event.h"
#include "eventfactory.h"

EventFactory::EventFactory(Server &server) :
    m_server(server)
{

}

EventFactory::~EventFactory()
{

}

void EventFactory::destroy(Event *e)
{
    unsigned long *len = (unsigned long *)(e - sizeof(unsigned long));

    e->~Event();

    m_server.freeMemory(len, *len);
}
